***********************************************************************
* This code produces results from analysis of municipal-level votes data
* reported in Online Appendix
* Michael Becher (michael.becher@ie.edu)
******************************************************************


******
*ONLINE APPENDIX TABLE B.7
******
use VotesMuni, clear
eststo clear
**Bivariate
eststo: reg pr10 protectionism, robust
**With canton FE
eststo: reg pr10 protectionism i.Kanton, robust
estadd local Canton_FE "\checkmark"
*district FE
eststo:  regress pr10 protectionism i. BFS_1999_BZNR, robust
estadd local Bezirk_FE "\checkmark"
**Weighted by votes
eststo: regress pr10 protectionism [aweight = total_votes], robust
eststo: regress pr10 protectionism i.Kanton [aweight = total_votes], robust
estadd local Canton_FE "\checkmark"
eststo:  regress pr10 protectionism i. BFS_1999_BZNR [aweight = total_votes], robust
estadd local Bezirk_FE "\checkmark"
esttab using "output/tab_vote_muni.tex", label r2 dep nocons replace ///
	keep(protectionism) ///
	cells(b(star fmt(%15.2fc)) se(par fmt(%15.2fc))) ///
	star(* 0.05) ///
	stats(r2  N, fmt(%6.2f  %15.0fc ) layout(@ @ @ @ @) ///
	labels("R$^2$"  "Observations")) ///
	collabels(none) mlabels("OLS" "OLS" "OLS" "WLS" "WLS" "WLS") ///
	mgroups("Vote for introduction of PR (1910)" , pattern(1 0 0 0 0) ///
	prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))
